package com.csp.mingyue.system.controller;

import com.csp.mingyue.common.core.vo.R;
import com.csp.mingyue.system.api.entity.SysLoginLog;
import com.csp.mingyue.system.service.SysLoginLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 系统访问记录 前端控制器
 * </p>
 *
 * @author Strive
 * @since 2023-11-20 08:03:54
 */
@Tag(name = "系统登录日志模块")
@RestController
@RequiredArgsConstructor
@RequestMapping("/sysLoginLog")
public class SysLoginLogController {

	private final SysLoginLogService sysLoginLogService;

	@PostMapping("save")
	@Operation(summary = "保存系统登录日志")
	public R<Boolean> save(@Valid @RequestBody SysLoginLog dto) {
		return R.ok(sysLoginLogService.saveLoginLog(dto));
	}

}
